package com.cn.zengzeng.spbzengzeng.test;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * @Description: 双色球
 * @Author: zhangzengzeng
 * @Date: 2021/6/27 16:02
 */
public class Demo {
    public static void main (String[] args) {
        List<Object> lists = new ArrayList<>(30000000);
        for(int k = 0;k < 200;k++) {
            List<String> list = new ArrayList<>();
            //红色号码01 - 33 之间   产生六组随机数
            int sum = 6 ;
            boolean flag = false ;
            for(int i = 0;i < sum;i++) {
                int num = new Random().nextInt(33) %33+ 1;
                String s = String.valueOf(num);
                if(num>9 && !flag){
                    sum=sum+1;
                    continue;
                }
                if(s.length()<2){
                    s = "0"+s ;
                }
                list.add(s);
                if(list.size()==1){
                    flag =true ;
                }

                if(list.size()==6){
                    break;
                }
            }

            //01-16共16个蓝色号码球中选择1个号码
            for(int i = 0;i < 1;i++) {
                int num = new Random().nextInt(16) %16+ 1;
                String s = String.valueOf(num);
                if(s.length()<2){
                    s = "0"+s ;
                }
                list.add("|");
                list.add(s);
            }
            lists.add(list);
        }
        for(int i = 0;i <lists.size();i++) {
            System.out.println(lists.get(i).toString());
            if("[05, 10, 11, 21, 22, 30, |, 13]".equals(lists.get(i).toString())){
                System.out.println(lists.get(i).toString());
            }
        }
    }
    @Test
    public void hh(){
        for(int i = 0;i < 2000000;i++) {
            int num = new Random().nextInt(16) %16+ 1;
            if(num==1){
                System.out.println("num = " + num);
                break;
            }
            String s = String.valueOf(num);
        }
    }

    @Test
    public void hh2(){

        int a =1 ;
        do {
            String b = null ;
            try {
                int parseInt = Integer.parseInt(b);
                System.out.println("parseInt = " );
            }catch(NumberFormatException e) {
                e.printStackTrace();
            }
            a++;
        }while(a<10);
    }
}
